package org.jsola.hr.helper;

import org.jsola.hr.dto.attendschedule.AttendCycleSaveDTO;
import org.jsola.hr.dto.attendschedule.CycleDaysDTO;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

/**
 * 周期天数
 *
 */
@Component
public class CycleDaysTestHelper extends BaseTestHelper {


    public List<AttendCycleSaveDTO> getAttendCycleList() {

        List<AttendCycleSaveDTO> list = new ArrayList<>();

        for (int i = 0; i < 3; i++) {
            AttendCycleSaveDTO attendCycle = new AttendCycleSaveDTO();
            attendCycle.setCycleName(getRandomValue("varchar",50));
            attendCycle.setCycleDays(this.getCycleDaysList());
            list.add(attendCycle);
        }
        return list;
    }


    /**
     *
     * @return
     */
    public List<CycleDaysDTO> getCycleDaysList() {

        List<CycleDaysDTO> list = new ArrayList<>();

        for (int i = 1; i < 3 ; i++) {

            CycleDaysDTO cycle = new CycleDaysDTO();
            // 班次名称
            cycle.setShiftName(getRandomValue("varchar",50));
            // 第几天
            cycle.setDaysName("第" + i + "天");
            list.add(cycle);
        }

        return list;
    }

}
